refactor: Clean up lms/envs/production.py cruft#36115
Merged
kdmccormick merged 10 commits intoopenedx:masterfrom Jan 16, 2025
Merged
refactor: Clean up lms/envs/production.py cruft#36115kdmccormick merged 10 commits intoopenedx:masterfrom
kdmccormick merged 10 commits intoopenedx:masterfrom
Conversation
This setting can be overridden in the YAML or derived from a setting that can change based on the YAML so it should be loaded explicitly using _YAML_TOKENS
be14a8f to
6c24675
Compare
feanil
approved these changes
Jan 16, 2025
Contributor
|
@kdmccormick: Thanks for continuing to clean up the platform! |
Contributor
|
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
Contributor
|
2U Release Notice: This PR has been deployed to the edX production environment. |
1 similar comment
Contributor
|
2U Release Notice: This PR has been deployed to the edX production environment. |
Contributor
|
2U Release Notice: This PR has been rolled back from the edX production environment. |
1 similar comment
Contributor
|
2U Release Notice: This PR has been rolled back from the edX production environment. |
robrap
added a commit
that referenced
this pull request
Jan 17, 2025
Contributor
|
2U Release Notice: This PR has been deployed to the edX production environment. |
1 similar comment
Contributor
|
2U Release Notice: This PR has been deployed to the edX production environment. |
1 task
This was referenced Jan 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This is a pure refactoring of lms/envs/production.py, removing several redundant statements that have accrued over the years as the platform moved from python-only, to python+json, to python+json+yaml, to today's python+yaml setup.
Notes on some of the more involved refactorings:
lms/envs/common.py is empty. So the update is a no-op and is the same as just loading this data directly from the YAML config.
the individual values is not necessary.
dashboarddjangoapp and can probably be deleted but might be used by plugins so not removing for now to keep the change backward compatible.Testing Instructions
We confirmed that the django settings exposed by lms/envs/production.py were identical using: https://gist.github.com/kdmccormick/9dd58fca319a6372776cd47d9136ffd3
git checkout kdmccormick/lms-envs-production-cleanup git restore upstream/master -s lms/envs/production.py mv lms/envs/production.py lms/envs/production_old.py git restore lms/envs/production.py ./diff_settings.sh lms/envs/production_old.py lms/envs/production.py # should yield a small diff of just random values